Returns width of the string in px.

<div class="definition">
    getStrWidth(str, styles)
</div>

<div class="arguments">
    <table>
    <tr>
        <td>str</td>
        <td><b>string</b>, string to calculate width</td>
    </tr>
    <tr>
        <td>styles</td>
        <td><b>string</b>, styles for the string</td>
    </tr>
    </table>
</div>

Calculates and returns width of the string in pixels.

<textarea class="javascript">
var width = w2utils.getStrWidth('Some text', 'font-size: 40px; font-weight: bold;');
console.log(width);
</textarea>